# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdialog
pkgver=22.04.3
pkgrel=0
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit -> kio
arch="all !armhf !s390x !riscv64"
url="https://www.kde.org/"
pkgdesc="A utility for displaying dialog boxes from shell scripts"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kdbusaddons-dev
	kguiaddons-dev
	kiconthemes-dev
	kio-dev
	knotifications-dev
	ktextwidgets-dev
	kwindowsystem-dev
	qt5-qtbase-dev
	samurai
	"
source="https://download.kde.org/stable/release-service/$pkgver/src/kdialog-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
a1b7ae0703fc88ae8e96c9b00f0fb918ed92a104c149cedf8cad5188187fdcaffe8bbafd5def2f1ad0317d1a55a4c5e3a23b554fc49a730060dbc5cd6c9424e1  kdialog-22.04.3.tar.xz
"
